package hn.cch.security.repository;


import hn.cch.security.entity.Role;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @author CCH
 * @version 2018.07.02
 */

@Repository
public interface RoleRepository extends JpaRepository<Role, Long> {
    @Query("select r from Role r where r.name like :name")
    Page<Role> findPageByName(@Param("name") String name, Pageable pageable);
}
